# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=windows-default-manifest
pkgver=6.4
pkgrel=1
pkgdesc='Default Windows application manifest'
url='http://cygwin.com/'
arch=('i686' 'x86_64')
license=('BSD')
makedepends=('cvs' 'gcc')
source=(001-msysize.patch)
md5sums=('2bf21e2fe716c60fd96c38584aff3075')
CVSROOT=":pserver:anoncvs:@sourceware.org:/cvs/cygwin-apps"
CVSMOD="windows-default-manifest"
CVS_BRANCH="release-${pkgver//\./_}"

prepare() {
  cd ${srcdir}
  msg "Connecting to sourceware.org CVS server...."
  if [ -d $CVSMOD/CVS ]; then
    cd $CVSMOD
    cvs -z3 update -d
  else
    cvs -z3 -d $CVSROOT co -r $CVS_BRANCH -f $CVSMOD
    cd $CVSMOD
  fi

  patch -p1 -i ${srcdir}/001-msysize.patch
  autoreconf -fiv
}

build() {
  cd ${srcdir}/${pkgname}
  ./configure --prefix=/usr
  make
}

package() {
  cd ${srcdir}/${pkgname}
  make DESTDIR=${pkgdir} install
}
